<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->

<title>getcchar</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_000_417">&nbsp;</a>NAME</h4><blockquote>
getcchar - get a wide character string and rendition from a <b>cchar_t</b>
</blockquote><h4><a name = "tag_000_000_418">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="curses.h.html">curses.h</a>&gt;

int getcchar(const cchar_t *<i>wcval</i>, wchar_t *<i>wch</i>, attr_t *<i>attrs</i>,
             short *<i>color_pair</i>, void *<i>opts</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_000_419">&nbsp;</a>DESCRIPTION</h4><blockquote>
When <i>wch</i> is not a null pointer, the
<i>getcchar()</i>
function extracts information from a <b>cchar_t</b> defined by <i>wcval</i>,
stores the character attributes in the object pointed to by <i>attrs</i>,
stores the colour pair in the object pointed to by <i>color_pair</i>, and
stores the wide character string referenced by <i>wcval</i> into the array
pointed to by <i>wch</i>.
<p>
When <i>wch</i> is a null pointer,
<i>getcchar()</i>
obtains the number of wide characters in the object pointed to by <i>wcval</i>
and does not change the objects pointed to by <i>attrs</i> or <i>color_pair</i>.
<p>
The <i>opts</i> argument is reserved for definition in a future edition of this
document.  Currently, the application must provide a null pointer as
<i>opts</i>.
</blockquote><h4><a name = "tag_000_000_420">&nbsp;</a>RETURN VALUE</h4><blockquote>
When <i>wch</i> is a null pointer,
<i>getcchar()</i>
returns the number of wide characters referenced by <i>wcval</i>, including the
null terminator.
<p>
When <i>wch</i> is not a null pointer,
<i>getcchar()</i>
returns OK upon successful completion, and ERR otherwise.
</blockquote><h4><a name = "tag_000_000_421">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_000_000_422">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
The <i>wcval</i> argument may be a value generated by a call to
<i><a href="setcchar.html">setcchar()</a></i>
or by a function that has a <b>cchar_t</b> output argument.  If
<i>wcval</i> is constructed by any other means, the effect is unspecified.
</blockquote><h4><a name = "tag_000_000_423">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="attroff.html">attroff()</a></i>,
<i><a href="can_change_color.html">can_change_color()</a></i>,
<i><a href="setcchar.html">setcchar()</a></i>,
<i><a href="curses.h.html">&lt;curses.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
